package com.cloud.demo.controller;

import com.cloud.demo.entity.User;
import com.cloud.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: xhn
 */
@RestController
public class DemoTestController {

    @Autowired
    private UserService userService;

    @RequestMapping("/findAll")
    public List<User> findAll(){

        List <User> all = userService.findAll();

        return all;
    }

}
